<!DOCTYPE html>
<html>
  <head>
    <title><%= title %></title>
	<link rel='stylesheet' href='/stylesheets/bootstrap.min.css' />
  </head>
  <body>
    <div class="container">
	<div class="row">
		&nbsp;
	</div>
	<div class="row">
		<div class="span8">
			<ul class="nav nav-pills">
				<% if(title == "Home") {%>
					<li class="active">
						<a href="/">Home</a>
					</li>
				<%}else{ %>
					<li>
						<a href="/">Home</a>
					</li>
				<%} %>
				
				<% if(user) {%>
				
					<li>
						<a href="/logout">Log out</a>
					</li>

					
					<% if(title == "Post") {%>
					<li class="active">
						<a href="/post">Post</a>
					</li>
				
					<%}else{ %>
					<li>
						<a href="/Post">Post</a>
					</li>
					<%} %>
					
					<li>
						<a href="/u/<%=user.name %>">@<%=user.name %></a>
					</li>
				<%}else{%>
				
					<% if(title == "Sign in") {%>
						<li class="active">
							<a href="/login">Sign in</a>
						</li>
					<%}else{ %>
						<li>
							<a href="/login">Sign in</a>
						</li>
					<%} %>
					
					
					<% if(title == "Register") {%>
						<li class="active">
							<a href="/reg">Register</a>
						</li>
					<%}else{ %>
						<li>
							<a href="/reg">Register</a>
						</li>
					<%} %>
				
				<%}%>
				
			</ul>
		</div>
		<div class="span4">
			<form class="form-search">
				<input class="input-medium search-query" type="text" /> <button type="submit" class="btn">Search</button>
			</form>
		</div>
	</div>